home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!sschaem
- From: sschaem@teleport.com (Stephan Schaem)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: RND
- Date: 5 Jan 1996 21:29:45 GMT
- Organization: Teleport - Portland's Public Access (503) 220-1016
- Message-ID: <4ck589$g07@maureen.teleport.com>
- References: <709.6578T1027T1962@login.eunet.no>
- NNTP-Posting-Host: linda.teleport.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Patrick Hanevold (patrick.hanevold@login.eunet.no) wrote:
-
- I found this to be random enought for me :)
-
- MACRO RND
- add.l d1,d0 ;d0 = 'random'
- swap d0
- add.l d0,d1 ;d1 = 'random'
- ENDM
-
- ; INPUT: A0.L = pointer to the RND structure
- ; D0.L = rnd value 1
- ; D1.L = rnd value 2
- Random:
- ml (a0)+,d0
- ml (a0),d1
- RND
- ml d1,(a0)
- ml d0,-(a0)
- rts
-
- It look lame but in my effects I work fine (I use it for stuff like
- pixelize wipe, fire effects, random object placement etc..)
-
- Stephan
-